From: Tim Starling Date: Thu, 1 Apr 2004 12:43:40 +0000 (+0000) Subject: fixing notices and syncing with refactoring in Article.php X-Git-Tag: 1.3.0beta1~659 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/404?a=commitdiff_plain;h=eba44727d58f37dc82ea5cb9c582e5f8b09761af;p=lhc%2Fweb%2Fwiklou.git fixing notices and syncing with refactoring in Article.php --- diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 902a0c5ade..dab95ac902 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -35,12 +35,12 @@ class ImagePage extends Article { list($width, $height, $type, $attr) = getimagesize( $path ); $sk = $wgUser->getSkin(); - + if ( $type != "" ) { # image - $s .= "
"; + $s = "
"; } else { - $s .= "
".$sk->makeMediaLink($name,"")."
"; + $s = "
".$sk->makeMediaLink($name,"")."
"; } $wgOut->addHTML( $s ); } @@ -152,8 +152,10 @@ class ImagePage extends Article { $q = "&image={$image}"; } else if ( !is_null( $oldimage ) ) { $q = "&oldimage={$oldimage}"; + } else { + $q = ""; } - return $this->confirmDelete( $q ); + return $this->confirmDelete( $q, $wgRequest->getText( 'wpReason' ) ); } function doDelete() @@ -169,7 +171,7 @@ class ImagePage extends Article { if ( !is_null( $image ) ) { $dest = wfImageDir( $image ); $archive = wfImageDir( $image ); - if ( ! unlink( "{$dest}/{$image}" ) ) { + if ( ! @unlink( "{$dest}/{$image}" ) ) { $wgOut->fileDeleteError( "{$dest}/{$image}" ); return; }